package com.thtf.openguess.controller;


import com.thtf.openguess.service.C2016000000B204122bService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author auth
 * @since 2022-05-27
 */
@RestController
@RequestMapping("/openguess/c2016000000-b204122-b")
@Api(value = "c2016000000-b204122-b",tags = "c2016000000-b204122-b")
public class C2016000000B204122bController {
    @Resource
    private C2016000000B204122bService service;

    @GetMapping("/insertLonely")
    @ApiOperation(value = "单线程循环新增",notes = "单线程循环新增")
    public String insertLonely(Integer sqlNum){
        return this.service.insertLonely(sqlNum);
    }

    @GetMapping("/insertBatch")
    @ApiOperation(value = "单线程批量新增",notes = "单线程批量新增")
    public String insertBatch(Integer sqlNum){
        return this.service.insertBatch(sqlNum);
    }

    @GetMapping("/insertThread")
    @ApiOperation(value = "多线程批量新增",notes = "多线程批量新增")
    public String insertThread(Integer sqlNum,Integer threadNum) throws InterruptedException {
        return this.service.insertThread(sqlNum,threadNum);
    }

    @GetMapping("/insertZzjgdm")
    @ApiOperation(value = "新增测试数据",notes = "新增测试数据")
    public String insertZzjgdm(Integer sqlNum,String zzjgdm){
        return this.service.insertZzjgdm(sqlNum,zzjgdm);
    }

    @GetMapping("/updateSingle")
    @ApiOperation(value = "单线程修改",notes = "单线程修改")
    public String update(String zzjgdm,Integer type){
        return this.service.updateSingle(zzjgdm,type);
    }

    @GetMapping("/updatebatch")
    @ApiOperation(value = "多线程修改",notes = "多线程修改")
    public String updatebatch(String zzjgdm,Integer type){
        return this.service.updatebatch(zzjgdm,type);
    }

    @GetMapping("/deleteSingle")
    @ApiOperation(value = "单线程删除",notes = "单线程删除")
    public String deleteSingle(String zzjgdm){
        return this.service.deleteSingle(zzjgdm);
    }

    @GetMapping("/deleteBatch")
    @ApiOperation(value = "多线程删除",notes = "多线程删除")
    public String deleteBatch(String zzjgdm){
        return this.service.deleteBatch(zzjgdm);
    }
}

